{% extends 'web_base/base_head_foot.html' %}
{% load staticfiles %}

{% block base_link_script %}
    <link rel="stylesheet" href="{% static 'css/index.css' %}"/>
    <link rel="stylesheet" href="{% static 'css/game_detail.css' %}"/>
{% endblock %}

{% block base_body %}
<div class="main ui container">
    <div class="lt_card">
        <div class="ui card gm_ls">
            <div class="content">
                <a href="#" class="img">
                    <img class="left floated ui image" src="/upload/{{ game.gamedetail.icon }}">
                </a>
                <div class="con">
                    <div class="header "><a href="#">{{ game.name }}</a></div>
                    <div class="meta "><a href="#">{{ game.gamedetail.factory.name }}</a></div>
                    <div class="description sty">
                        <div class="content btn_list">
                            {% if game.gamedown.android %}
                            <a href="/upload/{{ game.gamedown.android }}">
                            <button class="ui button"><i class="ui icon android"></i> 下载</button></a>
                            {% else %}
                            <button class="ui button"><i class="ui icon android"></i> 暂无</button>
                            {% endif %}
                            {% if game.gamedown.ios %}
                            <a href="/upload/{{ game.gamedown.ios }}">
                                <button class="ui button"><i class="icon ui apple"></i> 下载</button></a>
                            {% else %}
                            <button class="ui button"><i class="ui icon apple"></i> 暂无</button>
                            {% endif %}

                            <!--<button class="ui button">PC端下载</button>-->
                        </div>
                    </div>
                </div>
            </div>
            <div class="content">
                <p class="tit">简介</p>
                <div class="dtl">
                    {{ game.gamedetail.detail | linebreaks  }}
                </div>
                <div class="list_box">
                    <ul class="list_img">
                        {% for img in  game.gamedetail.rel_game_image.all %}
                        <li><img src="/upload/{{ img.image }}" alt=""/></li>
                        {% endfor %}
                    </ul>
                </div>
            </div>
            <div class="content">
                <p class="tit">详细信息</p>
                <div class="dtl_con">
                    <ul>
                        <li>
                            <span>文件大小:</span>
                            <!--<span>{{ game.gamedetail.size | filesizeformat }}</span>-->
                            <span>{{ size | filesizeformat }}</span>
                        </li>
                        <li>
                            <span>当前版本:</span>
                            <span>{{ game.gamedetail.version }}</span>
                        </li>
                        <li>
                            <span>更新时间:</span>
                            <span>{{ game.gamedown.last_time }}</span>
                        </li>
                        <li>
                            <span>厂商:</span>
                            <a href="#">{{ game.gamedetail.factory.name }}</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="rt_card">
        <div class="ui card">
            <div class="content">
                <img class="left floated ui image" src="/upload/images/ewm.png">
                <div class="header">天财游戏</div>
                <div class="meta">欢迎关注我们</div>
                <div class="meta">
                    <dl>
                        <dd class="wx">
                            <span  data-content="合作邮箱：cooperation@taptap.com" class="ui avatar image"></span>
                        </dd>
                        <dd class="qq">
                            <span  data-content="合作邮箱：cooperation@taptap.com" class="ui avatar image"></span>
                        </dd>
                        <dd class="wb">
                            <span  data-content="合作邮箱：cooperation@taptap.com" class="ui avatar image"></span>
                        </dd>
                        <dd class="yx">
                            <span  data-content="合作邮箱：cooperation@taptap.com" class="ui avatar image"></span>
                        </dd>
                    </dl>
                </div>
            </div>
        </div>
        <p class="tit list"><a href="#"><span>该游戏热门标签</span></a><a href="#"><span></span></a></p>
        <div class=" ui card">
            <div class="content btn_list">
                {% for tag in game.gamedetail.belong_class.all|slice:":6" %}
                <a href="{% url 'real_main' %}?class_id={{ tag.id }}">
                <button class="ui button">{{ tag.class_name }}</button>
                </a>
                {% endfor %}
            </div>
        </div>

        <p class="tit"><a href="#"><span>相关推荐</span></a><a href="#"><span></span></a></p>
        <div class="ui card list">
            {% for agame in game.gamedetail.belong_class.first.rel_game.all|slice:":5" %}
            <a class="item hot" href="{% url 'real_game_detail' %}?id={{ agame.belong_game.id }}">
                <img class="ui image" src="/upload/{{ agame.icon }}">
                <p>
                    <span>{{ agame.belong_game.name }}</span>
                    <span class="star"><u>{{ game.gamedetail.belong_class.first }}</u><o>{{ agame.level }}</o><i class="ui icon star"></i></span>
                </p>
            </a>
            {% endfor %}
        </div>

    </div>
</div>

{% endblock %}